package com.blog.utils;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

public class ResponseUtil {

	public static PrintWriter getPrintWriter() {
		HttpServletResponse response = ServletActionContext.getResponse();
		try {
			return response.getWriter();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}

	public static void out(String s) {
		getPrintWriter().write(s);
	}
}
